using System;
using System.Collections.Generic;
using System.Text;
using TVDesigner.Entities.Elements;

namespace TVDesigner.Generator.GeneratorEntities
{
    public class GenericComponentGeneratorFactory
    {
        public static GenericComponentGenerator GetGenerator(GenericComponent genericComponent)
        {
            if (genericComponent == null || genericComponent is ScreenResize)
                return null;

            if (genericComponent is HButton)
                return new HButtonGenerator(genericComponent as HButton);
            if (genericComponent is HIcon)
                return new HIconGenerator(genericComponent as HIcon);
            if (genericComponent is HText)
                return new HTextGenerator(genericComponent as HText);

            return null;
        }
    }
}
